package com.aracky.system.mapper;

import com.aracky.system.model.entity.SysRoleMenu;
import com.aracky.system.model.vo.SysMenuVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 角色和菜单关联表 Mapper 接口
 * </p>
 *
 * @author zzp
 * @since 2022-07-15 03:52:55
 */
@Mapper
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
    /**
     * 获取当前用户菜单信息
     *
     * @param currentUserId
     * @return
     */
    List<SysMenuVO> findCurrentMenuList(@Param("currentUserId") Long currentUserId);

    /**
     * 分配菜单给角色
     *
     * @param roleMenuList
     * @return
     */
    public int batchMenuRole(List<SysRoleMenu> roleMenuList);
}
